﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace LybrixNursingCRMDesktop.FrameWork
{
    internal class NavigationCenter
    {
        public static void ShowDetailPage(object targetObject, NavigationTarget navigationTarget, Page page)
        {
            switch (navigationTarget)
            {
                case NavigationTarget.AgentDetailsPage:

                    page.NavigationService.Navigate(new DetailAgent((LybrixNursingCommon.agent)targetObject));
 
                    break;
                case NavigationTarget.SapakDetailsPage:

                    page.NavigationService.Navigate(new SapakDetails((LybrixNursingCommon.Sapak)targetObject));

                    break;
                case NavigationTarget.NursingHomeDetails:

                    page.NavigationService.Navigate(new BetAvot((LybrixNursingCommon.NursingHome)targetObject));
                    break;
                case NavigationTarget.TeekDetails:

                    page.NavigationService.Navigate(new ProspectPage((LybrixNursingCommon.customer)targetObject));
                    break;
              
            }
        }




        public static void ShowSearchPage(NavigationTarget navigationTarget, Page page)
        {
            
            switch (navigationTarget)
            {
                case NavigationTarget.AgentsPage:
                   (MainPage.lybrixMainframe).Content =  new agents();
                  
                    break;
                case NavigationTarget.SapakPage:
                    (MainPage.lybrixMainframe).Content = new Sapakem();

                    break;
                case NavigationTarget.NursingHome:
                    (MainPage.lybrixMainframe).Content = new BateAvot();

                    break;

            }
        }









    }
}
